package com.yinhai.uid.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author taojie
 * @Date: 2018/12/26 09:54
 * @Description:
 */

@RestController
@RequestMapping(value = "/test")
public class TestController {

//	@Autowired
//	UidGenerator uidGenerator;
//
//	@RequestMapping(value="/testSerialGenerate")
//	public void testSerialGenerate() {
//		Set<Long> uidSet = new HashSet<>(100000);
//		for (int i = 0; i < 100000; i++) {
//			doGenerate(uidSet, i);
//		}
//	}
//
//	private void doGenerate(Set<Long> uidSet, int index) {
//		long uid = uidGenerator.getUID();
//		String parsedInfo = uidGenerator.parseUID(uid);
//		uidSet.add(uid);
//		System.out.println(Thread.currentThread().getName() + " No." + index + " >>> " + parsedInfo);
//	}
}
